home *** CD-ROM | disk | FTP | other *** search
/ Champak 128 / Vol 128 (Damaged).iso / games / scooby_d.swf / scripts / __Packages / com / ndimedia / ui / ToolTip.as < prev    next >
Encoding:
Text File  |  2011-03-26  |  879 b   |  30 lines

  1. class com.ndimedia.ui.ToolTip extends com.ndimedia.ui.UIObject implements com.ndimedia.ui.iUIObject
  2. {
  3.    var m_sLabel;
  4.    var m_tfLabel;
  5.    var m_namespace = "ToolTip";
  6.    static var X_MARGIN = 5;
  7.    function ToolTip(scope, label)
  8.    {
  9.       super(scope,false);
  10.       this.m_sLabel = label;
  11.       this.graphics.createTextField("tf",101,0,0,10,10);
  12.       this.m_tfLabel = this.graphics.tf;
  13.       this.m_tfLabel.autoSize = true;
  14.       var _loc3_ = new TextFormat("Arial",10,0);
  15.       this.m_tfLabel.setTextFormat(_loc3_);
  16.       this.m_tfLabel.text = label;
  17.       this.m_tfLabel.selectable = false;
  18.       this.hide();
  19.    }
  20.    function show(evt)
  21.    {
  22.       var _loc2_ = evt.target.graphics;
  23.       this.move(_loc2_._parent._xmouse + com.ndimedia.ui.ToolTip.X_MARGIN,_loc2_._parent._ymouse);
  24.    }
  25.    function hide(evt)
  26.    {
  27.       this.move(5000,0);
  28.    }
  29. }
  30.